﻿using System;
using System.Collections.ObjectModel;

namespace Transportr
{
    public class RouteAddViewModel : BaseItemViewModel
    {
        private FavoriteLinesModel linesModel;
        private FavoriteRoutesModel routesModel;
        private LineItemViewModel mSelectedLine;

        public string Faszomtext { get { return "FASZ"; } }

        public ObservableCollection<LineItemViewModel> Lines
        {
            get
            {
                return linesModel.Items;
            }
        }

        public LineItemViewModel SelectedLine
        {
            get { return mSelectedLine; }
            set
            {
                if (value != mSelectedLine)
                {
                    mSelectedLine = value;
                    NotifyPropertyChanged("SelectedLine");
                }
            }
        }
        
        public RouteAddViewModel()
        {
            linesModel = new FavoriteLinesModel();
            routesModel = new FavoriteRoutesModel();
            linesModel.BeginUpdate();
        }
    }
}
